<template>
<div class="goods">
    <van-icon name="arrow-left" @click="$router.go(-1)"/>
 <ul>
          <li v-for="item in GoodsListArr" :key="item.id">
              <img v-lazy="item.list_pic_url" alt="">
              <p>{{item.name}}</p>
              <span>&nbsp;&nbsp;{{item.retail_price|formatMoney}}&nbsp;&nbsp;</span>
          </li>
      </ul>
</div>
</template>

<script>
export default {
name: 'HomeGoods',
data() {
return {

}
},
props:['GoodsListArr'],
components: {

},
methods: {

},
created() {

},
}
</script>

<style lang='less' scoped>
.goods{
    position: relative;
    /deep/.van-icon{
    display: block;
    position: absolute;
    top: -49px;
}
ul{
        display: flex;
        justify-content: space-between;
        flex-wrap:wrap ;
        font-size: 16px;
        text-align: center;
        li{
            width: 46%;
            margin-left: 5px;
            margin-right: 5px;
            img{
                display: block;
                width: 100%;
            }
            span{
                display: block;
                height: 25px;
                line-height: 25px;
                color: rgb(155, 9, 9);
            }
            p{
                height: 25px;
                line-height: 25px;
                overflow: hidden;
                /*文本不会换行*/
                white-space: nowrap;
                /*当文本溢出包含元素时，以省略号表示超出的文本*/
                text-overflow: ellipsis;
            }
        }
    }
}
</style>